package com.bestom.waterquality.logic;

import android.content.Context;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

import com.bestom.waterquality.R;

import java.util.ArrayList;
import java.util.List;

/**
 * 密码设置
 */
public class PasswordSet {

    public static void setDataAndListen(Context context, View view){

        Spinner username = view.findViewById(R.id.user_name);
        EditText newPassword = view.findViewById(R.id.new_password);
        EditText confirmPassword = view.findViewById(R.id.confirm_password);
        ArrayAdapter<String> adapter= new ArrayAdapter<>(context, android.R.layout.simple_spinner_item, getUser());
        username.setAdapter(adapter);

        Button paraphraseSet = view.findViewById(R.id.paraphrase_set);
        Button reset = view.findViewById(R.id.reset);
    }

    private static List<String> getUser() {
        ArrayList<String> mList = new ArrayList<>();
        mList.add("admin");
        mList.add("印度阿三");
        mList.add("精神小伙");
        return mList;
    }
}
